/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 */

#ifndef __SCDL_PARSER_STRINGMAP_HPP__
#define __SCDL_PARSER_STRINGMAP_HPP__

#include <scdl/parser/common.hpp>

namespace scdl {

        struct StringMapSlot;
        class Symbol;
        typedef Symbol* StringMapData;

        class PARSER_DLLEXPORT StringMap {
        public:
                StringMap();
                ~StringMap();

                void clear();
                void print();
                StringMapData &operator[](const char *idx);
                bool find(const char *idx);
                void clearPrintChain();

        private:
                StringMapSlot **slots;
                StringMapSlot *first, *prev;
                int hash(const char *str);
        };

}

#endif /* __SCDL_PARSER_STRINGMAP_HPP__ */
